package com.example.device.adapter

import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.device.R
import com.example.device.entity.MaintainEntity

class MaintainAdapter :BaseQuickAdapter<MaintainEntity,BaseViewHolder>(R.layout.item_maintain)  {
    override fun convert(holder: BaseViewHolder, item: MaintainEntity) {
       holder.getView<TextView>(R.id.workOrderNum).text ="工单号: ${item.orderNumber}"
       holder.getView<TextView>(R.id.status).text = item.processingStatus
       holder.getView<TextView>(R.id.reportTime).text = "报修时间: ${item.repairTime}"
       holder.getView<TextView>(R.id.reporter).text ="报修人: ${item.repairName}"
       holder.getView<TextView>(R.id.phone).text = "联系电话: ${item.contactMethod}"
       holder.getView<TextView>(R.id.location).text = "位置: ${item.repairLocation}"
       holder.getView<TextView>(R.id.faultDesc).text =item.faultDescription
    }

}